home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
recent
/
iib122.lha
/
IIB
/
Threads
/
Additional
/
IARexx.lha
/
SpiralPathArth.irx
< prev
next >
Wrap
Text File
|
1997-09-20
|
1KB
|
65 lines
/* */
address 'Imagine.1'
displayrexxptr on
call addlib('rexxmathlib.library',0,-30,0)
/* call addlib('rexxreqtools.library',0,-30,0) <---relevant later? */
/* static constant */
pi = 3.14159
/* user variables */
numturn = 3 /* Number of 360 deg. turns for spiral */
rdius = 25 /* radius of spiral */
turnZ = 150 /* vertical space between loops/turn (space between loops) */
/* precalcs */
qturnZ = turnZ / 4 /* increment for each axis position */
xrot = ATAN( qturnZ * 0.75 / rdius ) * 180 / pi /* figure angle-up of axis */
do i=0 to (4 * numturn)
addaxis
pick
attrib.objectname = 'SP.'i
x = rdius * cos(pi * i / 2)
y = rdius * sin(pi * i / 2)
z= qturnz * i
angle = 90 * i
TRANSFORM_POSITION x y z
TRANSFORM_ALIGNMENT xrot 0 angle
setattributes objectname
end
/* This is irrelevant since the "makepath"
uses the first axis as the path:
addaxis
*/
unpick all
groupmode
/* make the path */
multipickon
do i = 0 to (4 * numturn)
pick 'SP.'i
end
multipickoff
makepath
/* reset origin axis to center and correct alignment */
TRANSFORMA_POSITION 0 0 0
TRANSFORMA_ALIGNMENT 0 0 0
displayrexxptr off
exit